package com.gxa.controller.statisticalControl;

import com.gxa.pojo.vo.BedVo;
import com.gxa.service.statistical.BedUsingService;
import com.gxa.utils.Result;
import com.gxa.utils.ResultUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h3>new-zhyl</h3>
 * <p></p>
 *
 * @author : ch
 * @date : 2024-02-27 09:35
 **/
@RequestMapping("/BedUsing")
@ResponseBody
@RestController
@Api(tags = "BedUsing")
public class BedUseController {

    @Autowired
    private BedUsingService bedUsingService;

    @ApiOperation("床位使用情况详情")
    @RequestMapping(value = "/selectBadUsing", method = RequestMethod.GET)
    public Result<BedVo> selectBadUsing() {

        return ResultUtils.buildSuccess(bedUsingService.selectBadUsing());
    }

    @ApiOperation("床位总数")
    @RequestMapping(value = "/selectBadTotal", method = RequestMethod.GET)
    public Result<Integer> selectBadTotal() {

        return ResultUtils.buildSuccess(bedUsingService.selectBadTotal());
    }
    @ApiOperation("已占用床位")
    @RequestMapping(value = "/selectBadUsed", method = RequestMethod.GET)
    public Result<Integer> selectBadUsed() {

        return ResultUtils.buildSuccess(bedUsingService.selectBadUsed());
    }

    @ApiOperation("未占用床位")
    @RequestMapping(value = "/selectBadUnUsed", method = RequestMethod.GET)
    public Result<Integer> selectBadUnUsed() {

        return ResultUtils.buildSuccess(bedUsingService.selectBadUnUsed());
    }


}
